package com.bjsxt.base.mytest.abstractfactory;

public class Main {
    public static void main(String[] args) {
        Animal animal1 = AnimalFactory.creatAnimal(AnimalEnum.cat);
        System.out.println(animal1.sing());
        Animal animal2 = AnimalFactory.creatAnimal(AnimalEnum.dog);
        System.out.println(animal2.sing());
        Animal animal3 = AnimalFactory.creatAnimal(AnimalEnum.pig);
        System.out.println(animal3.sing());
    }

}
